<php>
$category = C('CATEGORY_LIST');
$where = '';

$category_type   = $category_type?$category_type:'credentials';
$category_field  = $category_field?$category_field:'category_id';
//是否显示添加按钮1显示，2不显示
$is_category_add = $is_category_add?$is_category_add:'1';
$where['module']  = $category_type;
$where['status']  = 1;

$category_list   = D('category')->where($where)->order('user_id,order_id,id desc')->select();
$category_name   = $category_name?$category_name:'请选择';

if($category_list){
	foreach ($category_list as $rs) {
		$category_name_info[$rs['id']] = $rs['title'];
	}
}

</php>

<select name="{$category_field}" datatype="*">
	<option value="">{$category_name}</option>
	<volist name="category_list" id="rs">
		<option value="{$rs['id']}" weekshow="{$rs['week_show']}" <eq name="rs.id" value="$info[$category_field]">selected</eq> >{$rs['title']}</option>
	</volist>
</select>
			
<?php
$category_name = '';
?>